global equal, currentsel, foundation, basecard, godlist
on beginSprite me
row = determinerow()
end
on mouseEnter me
if the mouseDown and (the clickOn <> 0) then
if sprite(the clickOn).member <> member("empty", "playing cards") then
if sprite(the clickOn).member <> member("empty", "playing cards") then
put "1"
if foundation[row].getcardcount() = 0 then
if getlist(the clickOn).rank = basecard then
equal = 1
currentsel = spriteNum - 11
put currentsel
godlist = foundation[row]
end if
else
if foundation[row].getcardcount() > 0 then
put "1b"
if (getlist(the clickOn).rankvalue = (foundation[row].getlastcard().rankvalue + 1)) and (getlist(the clickOn).suit = foundation[row].getlastcard().suit) then
equal = 1
currentsel = foundation[row].getlastcard().spnum
godlist = foundation[row]
else
if (getlist(the clickOn).rank = "ace") and (foundation[row].getlastcard().rank = "king") and (getlist(the clickOn).suit = foundation[row].getlastcard().suit) then